Have update-alternatives handle new manpages; s/NAME.1FLAVOR/NAME.FLAVOR.1/.
authorRob Browning <rlb@defaultvalue.org>
Sun, 2 Aug 2009 23:56:02 +0000 (16:56 -0700)
committerRob Browning <rlb@defaultvalue.org>
Sun, 2 Aug 2009 23:56:02 +0000 (16:56 -0700)
debian/changelog
debian/emacsVER-bin-common.postinst
debian/emacsVER-bin-common.prerm
debian/rules

index 8a8a2d8b22cd71ed43f8ae2210a35aaebb94ed19..96df04b5f8bccbefb1ac669a9a8fc2468e3e4006 100644 (file)
@@ -14,7 +14,12 @@ emacs23 (23.1+1-2) unstable; urgency=low
     warnings.  Thanks to Sven Joachim <svenjoac@gmx.de> for the
     reminder.
 
- -- Rob Browning <rlb@defaultvalue.org>  Sun, 02 Aug 2009 14:53:26 -0700
+  * Fix update-alternatives to reflect the fact that all the binaries
+    have manpages now.  Thanks to Sven Joachim <svenjoac@gmx.de> for
+    the suggestion.  Rename manpages from NAME.1FLAVOR to
+    NAME.FLAVOR.1.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sun, 02 Aug 2009 16:52:20 -0700
 
 emacs23 (23.1+1-1) unstable; urgency=low
 
index 605994917827d99adce668549e5b3fbc7294e378..08dc2b2b4605c3a1a15a1e8b68fb3fbae65ca27f 100644 (file)
@@ -8,22 +8,12 @@ ALTERNATIVES="@ALTERNATIVES@"
 BIN_PRIORITY=@BIN_PRIORITY@
 
 # update-alternatives on things that collide with xemacs, other editors
-for i in ctags etags emacsclient
+for i in ${ALTERNATIVES}
 do
   update-alternatives \
     --install /usr/bin/$i $i /usr/bin/$i.${FLAVOR} ${BIN_PRIORITY} \
     --slave /usr/share/man/man1/$i.1.gz $i.1.gz \
-            /usr/share/man/man1/$i.1${FLAVOR}.gz 
-done
-
-for i in ${ALTERNATIVES}
-do
-  test $i = ctags && continue
-  test $i = etags && continue
-  test $i = emacs && continue
-  test $i = emacsclient && continue
-  update-alternatives --install /usr/bin/$i $i /usr/bin/$i.${FLAVOR} \
-    ${BIN_PRIORITY}
+            /usr/share/man/man1/$i.${FLAVOR}.1.gz
 done
 
 #DEBHELPER#
index 7ae55b5199634a98b0677cd993f154663f22c91c..3ab6c2178ea92b16e35b8b12423013a2e65014bc 100644 (file)
@@ -13,7 +13,6 @@ if [ "$1" != "upgrade" ]
 then
   for i in ${ALTERNATIVES}
   do
-    test $i = emacs && continue
     update-alternatives --remove $i /usr/bin/$i.${FLAVOR}
   done
 fi
index a8373767a215bfad1e48011b453ab7fe870c0ff0..81fe5e2958a0a99589678f6595148c79fce383a3 100755 (executable)
@@ -651,10 +651,10 @@ define install_common_binpkg_bits
 
   install -d $(2)/usr/share/man/man1
   dh_link -p$(3) \
-    usr/share/man/man1/emacs.1$(flavor).gz \
+    usr/share/man/man1/emacs.$(flavor).1.gz \
     usr/share/man/man1/$(flavor).1.gz
   dh_link -p$(3) \
-    usr/share/man/man1/emacs.1$(flavor).gz \
+    usr/share/man/man1/emacs.$(flavor).1.gz \
     usr/share/man/man1/$(flavor)-$(4).1.gz
 
 endef
@@ -729,11 +729,11 @@ install: debian/stamp/build $(autogen_install_files)
              $(pkgdir_common)/usr/share/info/$(info_subdir)/$$f; \
        done
 
-       perl -pi -e "s|man1/etags\\.1|man1/etags\\.1$(flavor)|" \
-         $(pkgdir_common)/usr/share/man/man1/ctags.1$(flavor)
+       perl -pi -e "s|man1/etags\\.1|man1/etags\\.$(flavor)\\.1|" \
+         $(pkgdir_common)/usr/share/man/man1/ctags.$(flavor).1
 
        cd $(pkgdir_common)/usr/share/man/man1/ && \
-         for f in *.1; do mv $$f $${f}$(flavor); done
+         for f in *.1; do mv $$f $$(basename $${f} .1).$(flavor).1; done
 
         # At least etc/COPYING is needed by M-x describe-copying.
        rm $(pkgdir_common)/usr/share/emacs/$(runtime_ver)/etc/COPYING